package com.zx.bean;
import java.util.List;


public class SendTaskDAOProxy implements ISendTaskDAO{
	private IDatabaseConnection dbc=null;
    private ISendTaskDAO dao=null;
   
    public SendTaskDAOProxy(){
       try{
           this.dbc=new DBConnection();
           this.dao=new SendTaskDAOImpl(this.dbc.getConnection());
       }catch(Exception e){
           e.printStackTrace();
       }
    }
   
    public  List<Object[]> findSendTask() throws Exception {
    	List<Object[]> list= null ;
       try{
           list=this.dao.findSendTask();//调用真实主题实现类
       }catch(Exception e){
           e.printStackTrace();
       }finally{
           this.dbc.closeConnection();//关闭数据库连接
       }
      
       return list;
    }
   
    public boolean updateSendTask(String mobile) throws Exception {
       boolean bFlag=false;
       try{
           bFlag=this.dao.updateSendTask(mobile);
       }catch(Exception e){
           e.printStackTrace();
       }finally{
           this.dbc.closeConnection();
       }
       return bFlag;
    }
	
}
